Add Steps at Rust Test Setup #1123
Add Steps at Rust Test Setup #1123vinibarbosabr wants to merge 4 commits intomultiversx:developmentfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds missing initial setup steps to the Rust smart contract testing guide, clarifying the build and proxy generation process.
- Introduces a build command step before testing
- Documents how to create a test file in
tests/ - Adds instructions for generating and importing the contract proxy
|
|
||
| [comment]: # (mx-context-auto) | ||
|
|
||
| If you haven't yet, run the build command for your smart contract while in the contract directory `your-contract/`, that contains all the contract's directories. |
There was a problem hiding this comment.
[nitpick] Consider rephrasing "If you haven't yet" to "If you haven't already" for smoother readability.
| If you haven't yet, run the build command for your smart contract while in the contract directory `your-contract/`, that contains all the contract's directories. | |
| If you haven't already, run the build command for your smart contract while in the contract directory `your-contract/`, that contains all the contract's directories. |
| sc-meta all build | ||
| ``` | ||
|
|
||
| ### Creating test file |
There was a problem hiding this comment.
[nitpick] Heading capitalization is inconsistent; consider using title case (e.g., "### Create Test File") to match other section headings.
| ### Creating test file | |
| ### Creating Test File |
|
|
||
| In the root of the contract, at the path `your-contract/`, create the configuration file `sc-config.toml`, where we will specify the path to generate the proxy. The file should contain the following code: | ||
|
|
||
| ```rust title=sc-config.toml |
There was a problem hiding this comment.
[nitpick] The sc-config.toml snippet is TOML, so using toml instead of rust would improve syntax highlighting and clarity.
| ```rust title=sc-config.toml | |
| ```toml title=sc-config.toml |
| In the terminal, in the root of the contract, we will run the next command that will generate the proxy for your smart contract: | ||
|
|
||
|
|
||
| ``` |
There was a problem hiding this comment.
[nitpick] This code block should specify a language (e.g., ```bash) for consistent formatting of CLI commands.
| ``` | |
| ```bash |
Description of the pull request (what is new / what has changed)
Added two steps for developers/testing/rust/sc-test-setup.md and an overall introduction.
It was unclear for me (as a beginner) that I was supposed to first generate a proxy before being able to run blackbox tests.
The lack of this information got me stuck for a while with unresolved errors, until understanding this need, which should be clearly specified in the Test Setup directory.
Did you test the changes locally ?
Which category (categories) does this pull request belong to?